package com.wencai.bean;

import java.util.Objects;

/**
 * @author wangpan
 * @date 2023/4/16
 */
public class NativeStock {
    private String name;
    private Double increment;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Double getIncrement() {
        return increment;
    }

    public void setIncrement(Double increment) {
        this.increment = increment;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        NativeStock stock = (NativeStock) o;
        return Objects.equals(name, stock.name) &&
                Objects.equals(increment, stock.increment);
    }

    @Override
    public int hashCode() {
        return Objects.hash(name, increment);
    }

    public NativeStock(String name, Double up) {
        this.name = name;
        this.increment = up;
    }

    @Override
    public String toString() {
        final StringBuffer sb = new StringBuffer("Stock{");
        sb.append("name='").append(name).append('\'');
        sb.append(", up=").append(increment);
        sb.append('}');
        return sb.toString();
    }
}
